<template>
  <div class="a">
    <cube-button primary @click="$router.push('/')">回到商城</cube-button>
  </div>
</template>

<script>
import api from '@/api'
export default {
  methods: {
    // 签到
    activity() {
      api.News.run({ news_id: this.$route.params.id }).then(() => {
        this.$createDialog({
          type: 'alert',
          title: '签到成功',
          onConfirm: () => this.$router.push('/'),
          timeout: 500
        }).show()
      })
    }
  },
  mounted() {
    this.activity()
  }
}
</script>

<style scoped lang="stylus">
.a
  margin-top 100px
  padding 0 30px
</style>
